﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ImModels.View.MsgJson
{
    /// <summary>
    /// 被动加入一个群 收到的 json 消息
    /// </summary>
    public class Msg_Session
    {
        /// <summary>
        /// 0普通聊天消息 1新创建的群聊 或 被加入新的群聊
        /// </summary>
        public int type { get; set; } = 1;

        /// <summary>
        /// 会话ID 全局唯一的
        /// </summary>
        public long sessionid { get; set; } = 0;

        /// <summary>
        /// 会话信息
        /// </summary>
        public SessionItem session { get; set; }
    }

    /// <summary>
    /// 会话对象
    /// </summary>
    public class SessionItem
    {
        /// <summary>
        /// 接收方ID 群的时候 为群ID
        /// </summary>
        public string toUserId { get; set; } = "";
        /// <summary>
        /// 是否为群消息 0私聊 1群聊 2系统会话
        /// </summary>
        public int isgroup { get; set; } = 0;

        /// <summary>
        /// 名称
        /// </summary>
        public string fullname { get; set; } = "";

        /// <summary>
        /// 头像 如果是群聊，会有多个头像，前端可以分块快显示
        /// </summary>
        public string headimg { get; set; } = "";

        /// <summary>
        /// 投标,投诉,讨论
        /// </summary>
        public string flags { get; set; } = "";
    }
}
